//
//  ViewController.m
//  JQKit
//
//  Created by JQZ on 2017/12/28.
//  Copyright © 2017年 JQZ. All rights reserved.
//

#import "ViewController.h"
#import "JQKit.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    // Do any additional setup after loading the view.
    
    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {
        if ([self respondsToSelector:@selector(edgesForExtendedLayout)]){
            self.edgesForExtendedLayout = UIRectEdgeNone;
        }
    }
    
    [self.view setBackgroundColor:HexColor(0xffffff)];
    
    UIButton *button = createButton([UIFont systemFontOfSize:18.0f],
                                    [UIColor whiteColor],
                                    self,
                                    @selector(buttonClicked));
    button.frame = CGRectMake(10, 100, SCREEN_WIDTH - 20, 50);
    [button setTitle:@"点我" forState:UIControlStateNormal];
    [button.layer setMasksToBounds:YES];
    [button.layer setCornerRadius:4.0f];
    [button.layer setBorderWidth:BORDER_WIDTH_2PX];
    [button.layer setBorderColor:HexAColor(0x000000,0.08).CGColor];
    [button setBackgroundColor:HexColor(0x1AAD19) forState:UIControlStateNormal];
    [button setBackgroundColor:HexColor(0x179b16) forState:UIControlStateHighlighted];
    [button setBackgroundColor:HexAColor(0x1AAD19,0.6f) forState:UIControlStateDisabled];
    [self.view addSubview:button];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)buttonClicked
{
//    NSString *deviceID = [[UIDevice currentDevice] uniqueDeviceIdentifier];
//    NSLog(@"[DEBUG] device id = %@", deviceID);
//
//    NSString *url = @"https://www.baidu.com";
//    WKWebViewController *webVC = [[WKWebViewController alloc] initWithUrl:url];
//    webVC.disableBackButton = NO;
//    [self.navigationController pushViewController:webVC animated:YES];
}

@end
